package UI
{
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	
	public class UIFrame extends Sprite
	{
		public var mBGColor:int=0xEEEEEE;
		public var mBordColor:int=0x111111;
		public function UIFrame()
		{
			super();
			
			addEventListener(MouseEvent.MOUSE_DOWN,OnMouseDown);
		}

		public function Create(x:int,y:int,w:int,h:int):Boolean
		{
			this.x=x;
			this.y=y;
			
			graphics.lineStyle(2,mBordColor,0.75);
			graphics.beginFill(mBGColor,0.2);
			graphics.drawRoundRect(0,0,w,h,6,6);
			graphics.endFill();
			return true;
		}
		
		public function OnMouseDown(event:MouseEvent):void
		{
			event.stopImmediatePropagation();
		}		
	}
}